package Model;

/**
 *
 * @author HaTschE
 */
public class Year {

    private boolean flag;
    private String name;
    private String[] quarterlyAbsoluteChange;
    private String[] quarterlyChangeByGDP;
    private String[] quarterlyByGDP;
    private String[] quarterlyOrg;
    private String[] quarterlyGDP;

    public String[] getQuarterlyAbsoluteChange() {
        if (isFlag()) {
            return quarterlyAbsoluteChange;
        } else {
            String excludedQuarter[] = {"?", "?", "?", "?"};
            return excludedQuarter;
        }
    }

    public void setQuarterlyAbsoluteChange(int quarter, String quarterlyAbsoluteChange) {
        this.quarterlyAbsoluteChange[quarter] = quarterlyAbsoluteChange;
    }

    public String[] getQuarterlyChangeByGDP() {
        if (isFlag()) {
            return quarterlyChangeByGDP;
        } else {
            String excludedQuarter[] = {"?", "?", "?", "?"};
            return excludedQuarter;
        }
    }

    public void setQuarterlyChangeByGDP(int quarter, String quarterlyChangeByGDP) {
        this.quarterlyChangeByGDP[quarter] = quarterlyChangeByGDP;
    }

    public String[] getQuarterlyByGDP() {
        if (isFlag()) {
            return quarterlyByGDP;
        } else {
            String excludedQuarter[] = {"?", "?", "?", "?"};
            return excludedQuarter;
        }
    }

    public void setQuarterlyByGDP(int quarter, String quarterlyByGDP) {
        this.quarterlyByGDP[quarter] = quarterlyByGDP;
    }

    public String[] getQuarterlyOrg() {
        if (isFlag()) {
            return quarterlyOrg;
        } else {
            String excludedQuarter[] = {"?", "?", "?", "?"};
            return excludedQuarter;
        }
    }

    public void setQuarterlyOrg(int quarter, String quarterlyOrg) {
        this.quarterlyOrg[quarter] = quarterlyOrg;
    }

    public String[] getQuarterlyGDP() {
        if (isFlag()) {
            return quarterlyGDP;
        } else {
            String excludedQuarter[] = {"?", "?", "?", "?"};
            return excludedQuarter;
        }
    }

    public void setQuarterlyGDP(int quarter, String quarterlyGDP) {
        this.quarterlyGDP[quarter] = quarterlyGDP;
    }
    private String[] quarterlyCrisis;

    public String[] getQuarterlyCrisis() {
        return quarterlyCrisis;
    }

    public void setQuarterlyCrisis(String[] quarterlyCrisis) {
        this.quarterlyCrisis = quarterlyCrisis;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getName() {
        return name;
    }

    public Year(String name) {
        this.name = name;
        this.setFlag(true);
        quarterlyAbsoluteChange = new String[4];
        quarterlyChangeByGDP = new String[4];
        quarterlyByGDP = new String[4];
        quarterlyGDP = new String[4];
        quarterlyOrg = new String[4];
        String noCrisis[] = {"NO", "NO", "NO", "NO"};
        quarterlyCrisis = noCrisis;
    }
}
